import { Button } from 'antd';

export const FILTERS = [
    {
        label: '规则名称',
        type: 'Input',
        dataField: 'name',
        props: {
            defaultValue: 'hello',
        },
    },
];

export const BTNS = [
    {
        name: '查询',
        props: {
            type: 'primary',
        },
    },
];

export const COLUMNS = [
    {
        title: '规则名称',
        dataIndex: 'name',
        key: 'name',
    },
    {
        title: '操作',
        key: 'operator',
        render (txt, record) {
            switch (record.promission) {
                case '1':
                    return (
                        <>
                            <Button>aa</Button>
                            <Button>bb</Button>
                        </>
                    );
                case '2':
                    return (
                        <>
                            <Button>bb</Button>
                            <Button>cc</Button>
                        </>
                    );
            
                default:
                    return (
                        <>
                            <Button>a1</Button>
                            <Button>a2</Button>
                        </>
                    );
            }
        },
    },
];
